import {observable, toJS} from 'mobx'
import {message} from "antd"


const modelStore = observable({
  //加载等待
  loading: true,
  cardloading: true,
  //加载详情
  loadingDetail: true,
  loadingMEP: true,
  //选中的数据
  clickRowData: {},
  //详情选中数据
  patientDetaiClickRowData: {},
  //添加窗口
  showAddForm: false,
  //编辑窗口
  showEditForm: false,
  showEditDetailForm: false,
  //详情窗口
  showDetailsForm: false,
  //治疗记录
  showPatientDetailsForm: false,
  //MEP的窗口
  showPatientMEPForm: false,
  //治疗记录详情
  showPatientDetailDetailForm: false,
  //搜索框值
  searchRef: {},
  searchDetailRef: {},
  //编辑框的值
  editRef: {},
  editDeTailRef: {},
  //编辑框的值
  addRef: {},
  //表格数据
  listData: [],
  //详情数据
  listDetailData: [],
  listMEPData: [],
  cardListData: [],
  hospitalName: "",
  fnirTimeSelect:1,
  fnirTimeSelectOption:[
    {value:1,label:"今天"},
    {value:2,label:"最近2天"},
    {value:3,label:"最近3天"},
    {value:7,label:"最近7天"},
    {value:30,label:"最近30天"},
    {value:3000,label:"全部"},
  ],
  columns:[],

  //刷卡查询
  cardRef: {},
  showCardForm: false,
  //设置医保卡
  setShowCardForm() {
    modelStore.showCardForm = true;
  },

  //打开新增窗口
  setShowAddForm() {
    modelStore.showAddForm = true;
  },
  //打开编辑窗口
  setShowEditForm(records) {
    modelStore.clickRowData = records;
    modelStore.showEditForm = true;
  },
  //打开编辑窗口
  setShowEditDetailForm(records) {
    modelStore.patientDetaiClickRowData = records;
    modelStore.showEditDetailForm = true;
  },
  //打开详情窗口
  setShowDetailsForm(records) {
    modelStore.clickRowData = records;
    modelStore.showDetailsForm = true;
  },

  show(){
    let ass=require("../../assets/ding.mp3")
    const audio = new Audio(ass.default)
    audio.play().then()
    message.success("hello.").then()
  }

})

export default modelStore
